<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>疫情监控</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- begin::global styles -->
    <link rel="stylesheet" href="../static/assets/vendors/bundle.css" type="text/css">
    <!-- end::global styles -->

    <!-- begin::custom styles -->
    <link rel="stylesheet" href="../static/assets/css/app.css" type="text/css">
    <link rel="stylesheet" href="../static/assets/css/custom.css" type="text/css">
    <!-- end::custom styles -->
	<link href="../static/css/main.css"  rel="stylesheet"/>
    <script src="../static/js/jquery-1.11.1.min.js"></script>
	<script src="../static/js/echarts.min.js"></script>
	<script src="../static/js/china.js"></script>
	<script src="../static/js/echarts-wordcloud.min.js"></script>

</head>
<body onresize="refreshPage()">



<!-- begin::page loader-->
<div class="page-loader">
    <div class="spinner-border"></div>
    <span>Loading ...</span>
</div>
<!-- end::page loader -->

<!-- begin::sidebar -->
<div class="sidebar">
    <ul class="nav nav-pills nav-justified m-b-30" id="pills-tab" role="tablist">
        <li class="nav-item">
            <a class="nav-link" id="notifications-tab" data-toggle="pill" href="#notifications" role="tab"
               aria-controls="notifications" aria-selected="false">
                <i class="fa fa-bell"></i>
            </a>
        </li>
        <li class="nav-item">
            <a class="nav-link" id="settings-tab" data-toggle="pill" href="#settings" role="tab"
               aria-controls="settings" aria-selected="false">
                <i class="ti-settings"></i>
            </a>
        </li>
    </ul>
    <div class="tab-content" id="pills-tabContent">
        <div class="tab-pane" id="notifications" role="tabpanel" aria-labelledby="notifications-tab">
            <div class="tab-pane-body">
                <h5 class="font-weight-bold m-b-20">Notifications</h5>
                <div>
                    <p class="text-muted">Today</p>
                    <ul class="list-group list-group-flush m-b-10">
                        <li class="list-group-item d-flex p-l-r-0">
                            <div>
                                <figure class="avatar avatar-xs m-r-10">
                                    <span class="avatar-title bg-success rounded-circle">A</span>
                                </figure>
                            </div>
                            <div>
                                <p class="m-b-0">
                                    <span class="badge small badge-danger">New</span>
                                    New user registration.
                                </p>
                                <ul class="list-inline small">
                                    <li class="list-inline-item text-muted">8 minute ago</li>
                                    <li class="list-inline-item">
                                        <a href="#">Mark Read</a>
                                    </li>
                                    <li class="list-inline-item">
                                        <a href="#">View</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li class="list-group-item d-flex p-l-r-0">
                            <div>
                                <figure class="avatar avatar-xs m-r-10">
                                    <span class="avatar-title rounded-circle">
                                        <i class="fa fa-cloud-upload"></i>
                                    </span>
                                </figure>
                            </div>
                            <div>
                                <p class="m-b-0">Files uploaded successfully.</p>
                                <ul class="list-inline small">
                                    <li class="list-inline-item text-muted">50 minute ago</li>
                                    <li class="list-inline-item">
                                        <a href="#">Mark Read</a>
                                    </li>
                                    <li class="list-inline-item">
                                        <a href="#">View</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </div>
                <div>
                    <p class="text-muted">Yesterday</p>
                    <ul class="list-group list-group-flush m-b-10">
                        <li class="list-group-item d-flex p-l-r-0">
                            <div>
                                <figure class="avatar avatar-xs m-r-10">
                                    <span class="avatar-title bg-warning rounded-circle">V</span>
                                </figure>
                            </div>
                            <div>
                                <p class="m-b-0">New user registration.</p>
                                <ul class="list-inline small">
                                    <li class="list-inline-item text-muted">5 hours ago</li>
                                    <li class="list-inline-item">
                                        <a href="#">Mark Read</a>
                                    </li>
                                    <li class="list-inline-item">
                                        <a href="#">View</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li class="list-group-item d-flex p-l-r-0">
                            <div>
                                <figure class="avatar avatar-xs m-r-10">
                                    <span class="avatar-title rounded-circle">
                                        <i class="fa fa-file-o"></i>
                                    </span>
                                </figure>
                            </div>
                            <div>
                                <p class="m-b-0">Your invoice prepared.</p>
                                <ul class="list-inline small">
                                    <li class="list-inline-item text-muted">10 hours ago</li>
                                    <li class="list-inline-item">
                                        <a href="#">Mark Read</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li class="list-group-item d-flex p-l-r-0">
                            <div>
                                <figure class="avatar avatar-xs m-r-10">
                                    <span class="avatar-title rounded-circle">
                                        <i class="fa fa-cloud-upload"></i>
                                    </span>
                                </figure>
                            </div>
                            <div>
                                <p class="m-b-0">Files uploaded successfully.</p>
                                <ul class="list-inline small">
                                    <li class="list-inline-item text-muted">16 hours ago</li>
                                    <li class="list-inline-item">
                                        <a href="#">Mark Read</a>
                                    </li>
                                    <li class="list-inline-item">
                                        <a href="#">View</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="tab-pane-footer">
                <a href="#" class="btn btn-primary btn-block">Mark All Read</a>
            </div>
        </div>
        <div class="tab-pane" id="settings" role="tabpanel" aria-labelledby="settings-tab">
            <div class="tab-pane-body">
                <div class="m-b-30">
                    <h5 class="font-weight-bold m-b-20">Settings</h5>
                    <h6 class="font-weight-bold">System</h6>
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Automatic updates</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch1" checked>
                                <label class="custom-control-label" for="customSwitch1"></label>
                            </div>
                        </li>
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Current statistics</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch2" checked>
                                <label class="custom-control-label" for="customSwitch2"></label>
                            </div>
                        </li>
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>User suggestions</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch3" checked>
                                <label class="custom-control-label" for="customSwitch3"></label>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="m-b-30">
                    <h6 class="font-weight-bold">Accout</h6>
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Senior account security</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch4">
                                <label class="custom-control-label" for="customSwitch4"></label>
                            </div>
                        </li>
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Account protection</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch5" checked>
                                <label class="custom-control-label" for="customSwitch5"></label>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="m-b-30">
                    <h6 class="font-weight-bold">Notifications</h6>
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Browser notifications</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch6">
                                <label class="custom-control-label" for="customSwitch6"></label>
                            </div>
                        </li>
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Mobile notifications</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch7">
                                <label class="custom-control-label" for="customSwitch7"></label>
                            </div>
                        </li>
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Email subscription</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch8">
                                <label class="custom-control-label" for="customSwitch8"></label>
                            </div>
                        </li>
                        <li class="list-group-item d-flex justify-content-between p-l-r-0">
                            <span>Sms notifications</span>
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" id="customSwitch9" checked>
                                <label class="custom-control-label" for="customSwitch9"></label>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="tab-pane-footer">
                <a href="#" class="btn btn-primary btn-block">Save Settings</a>
            </div>
        </div>
    </div>
</div>
<!-- end::sidebar -->




<!-- begin::side menu -->
<div class="side-menu">
    <div class='side-menu-body'>
        <ul>

            <li class="side-menu-divider">Navigation</li>
            <li>
                <a href="/"><i class="icon ti-home"></i> <span>疫情报告</span> </a>
                <ul>
                    <li style="font-size: 13px"><a href="/#title">今日数据</a></li>
                    <li style="font-size: 13px"><a href="/#pre_map">疫情地图</a></li>
                    <li style="font-size: 13px"><a href="/#pre_trend">近日趋势</a></li>
                </ul>
            </li>
            <li class="hy_side_item"><a href="/info"><i class="icon ti-layers-alt"></i> <span>疫情资讯</span> </a></li>
            <li class="hy_side_item"><a href="/check"><i class="icon ti-files"></i> <span>诊断系统</span> </a></li>
            <li class="hy_side_item"><a href="/rumor"><i class="icon ti-pie-chart"></i> <span>谣言鉴别</span> </a></li>
            <li class="hy_side_item"><a href="/video"><i class="icon ti-crown"></i> <span>往期视频</span> </a></li>
            <li class="hy_side_item"><a href="/toreport"><i class="icon ti-clipboard"></i> <span>在线举报</span> </a></li>
            <li class="hy_side_item"><a href="/knowledge"><i class="icon ti-rocket"></i> <span>疫情科普</span> </a></li>

        </ul>
    </div>
</div>
<!-- end::side menu -->


<!-- begin::navbar -->
<nav class="navbar">
    <div class="container-fluid">

        <div class="header-logo">
            <a href="#">
                <img src="../static/assets/media/image/light-logo.png" alt="...">
                <span class="logo-text d-none d-lg-block">Team RD</span>
            </a>
        </div>



    </div>
</nav>
<!-- end::navbar -->



<!-- begin::main content -->
<main class="main-content" style="background: white">

<div class="container-fluid">
    <div id="gyroContain">
        <div id="hotSearch"></div>
        <div>
            <a style="margin-left: 450px" href="http://bmfw.www.gov.cn/xxgzbdfyjycxjkzg/index.html">如发现身体不适，请前往各省市发热门诊及定点救治医院</a>
        </div>
        <hr id="pre_risk" class="pre_line"></hr>
        <br>
        <form class="search" action="/search_rumor" method="post" style="margin-top: 10px">
                <div class="input-group">
                    <input id="key" type="text" class="form-control" name="key" placeholder="Search ..."
                           aria-label="Recipient's username"
                           aria-describedby="button-addon2">
                    <div class="input-group-append">
                        <button class="btn" type="button" id="query" onclick="myquery()" style="background: #F3F3F3">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>
                </div>
        </form>
        <br>
        <div id="risk">
            <div class="title"></div>
            <div class="ts"></div>
            <div id="risk_wrapper">
                <div id="risk_wrapper_li1">
                    <ul>
                    </ul>
                </div>
                <div id="risk_wrapper_li2"></div>
            </div>
        </div>

    </div>
</div>

</main>
<!-- end::main content -->


<!-- begin::global scripts -->
<script src="../static/assets/vendors/bundle.js"></script>
<!-- end::global scripts -->

<!-- begin::custom scripts -->
<script src="../static/assets/js/app.js"></script>
<!-- end::custom scripts -->






</body>

<script src="../static/js/ec_trend.js"></script>
<script src="../static/js/ec_map.js"></script>
<script src="../static/js/ec_top.js"></script>
<script src="../static/js/ec_risk.js"></script>
<script src="../static/js/ec_hotSearch.js"></script>
<script>
        function get_l2_data() {
    $.ajax({
        url:"/risk",
        success: function(data) {
            var update_time = data.update_time
            var details = data.details
            var risk = data.risk
             $("#risk .ts").html("截至时间：" + update_time)
            var s =""
            for(var i in details){
                if (risk[i] == "高风险"){
                     s += "<li><span class='high_risk'>高风险\t\t</span>"+ details[i] + "</li>"
                }else{
                     s += "<li><span class='middle_risk'>中风险\t\t</span>"+ details[i] + "</li>"
                }
            }
             $("#risk_wrapper_li1 ul").html(s)
            start_roll()
		},
		error: function(xhr, type, errorThrown) {
		}
    })
}

        get_l2_data()
        function get_r2_data() {
    $.ajax({
        url: "/hotSearch",
        success: function (data) {
            ec_right2_option.series[0].data=data.kws;
            ec_hotSearch.setOption(ec_right2_option);
        }
    })
}
        get_r2_data()
    </script>
<script>
    function myquery(){
        $("#risk").html('<table id = "group" style="text-align: left;border-collapse:collapse;">' +
        '</table>'
        );
        var mkey = $("#key").val()
        $.ajax({
        url:"/search_risk?key=" + mkey,
        success: function(data) {
            var update_time = data.update_time
            var details = data.details
            var risk = data.risk

             $("#risk .ts").html("截至时间：" + update_time)
            for(var i in details){
                if (risk[i] == "高风险"){
                     $("#group").append('<tr > ' +
                    '<td style=" width: 5%; color: red">' + '高风险' + '</td>' +
                    '<td style="color: black">' + details[i] + '</td>' +
                    '</tr>')
                }else{
                     $("#group").append('<tr> ' +
                    '<td style="width: 5%; color: yellow">' + '中风险' + '</td>' +
                    '<td style="color: black">' + details[i] + '</td>' +
                    '</tr>')
                }
            }

            start_roll()
		},
		error: function(xhr, type, errorThrown) {
		}
    })
    }
</script>

</html>


